package com.shiguiwu.springboot3.cart.properties;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @description: 属性配置类
 * @author: stone
 * @date: Created by 2023/12/17 14:27
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springboot3.cart.properties
 */
@Component
@ConfigurationProperties(prefix = "cart.config")
@Slf4j
@Data
public class CommonProperties {

    private String username;

    private Integer age;

    private String password;

    public CommonProperties() {
        log.error("无参构造 ================================");
    }

    public void setUsername(String username) {
        log.error("set username ================================");
        this.username = username;
    }
}
